<?php

function __autoload($class_name)
    {
        include $class_name . '.php';
    }
$conn = new dbConnection();
echo 'plnim databazi clanku!';
for($i = 0;$i < 5;++$i)
{
    $query = "INSERT INTO articles
        VALUES (null,$i, ".rand(1,5).",CURDATE(),0,0,'header$i','anotation$i','article$i','', 1,1)";
    $result = $conn->db_query($query);
    if(!$result)
    {
        die('Invalid query: ' . mysql_error());
    }
}
echo $result;
?>
